/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cip.esymons.tramite.bc;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.cip.esymons.tramite.be.SolRecep;

/**
 *
 * @author FreddyHIQ
 */
@Stateless
public class SolRecepFacade implements SolRecepFacadeLocal {
    @PersistenceContext
    private EntityManager em;

    public void create(SolRecep solRecep) {
        em.persist(solRecep);
    }

    public void edit(SolRecep solRecep) {
        em.merge(solRecep);
    }

    public void remove(SolRecep solRecep) {
        em.remove(em.merge(solRecep));
    }

    public SolRecep find(Object id) {
        return em.find(SolRecep.class, id);
    }

    public List<SolRecep> findAll() {
        return em.createQuery("select object(o) from SolRecep as o").getResultList();
    }

}
